import math

n = int(input())
arr = []
for i in range(0, n+1):
    arr.append(i)
arr.remove(0)
arr.remove(1)
for j in range(2, int(math.sqrt(n))+1):
    for i in range(j*j, n+1, j):
        if i in arr:
            arr.remove(i)

for i in arr:
    print(i)
